<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>列表渲染-自然数</p>
        <ul v-for="item in 10">
            <li>
                {{ item }}
            </li>
        </ul>

        <p>列表渲染-对象</p>
        <ul v-for="item,key in listObj">
            <li>
                {{ item }}---{{ key }}
            </li>
        </ul>

        <p>列表渲染-数组</p>
        <ul v-for="item,index in listArr">
            <li>
                {{ item }}---{{ index }}
            </li>
        </ul>
    </div>

    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                listObj: {
                    id: 1001,
                    name: 'zhang',
                    sex: 'male'
                },
                listArr: [
                    "青龙",
                    "白虎",
                    "朱雀",
                    "玄武"
                ]
            }
        })
    </script>
</body>
</html>